

f=open('./test.txt','w',encoding='utf8')

f.write('hello\n')

f.close()

f = open('./test.txt','r')

f.write('hello\n')

result=f.read(2)

print(f'result={result}')

f.close()